package cn.ebook.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateFactory {

	public static Date DateStr2Date(String date) {
		Date newdate=null;
		try {
			SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
			newdate = format.parse(date);
		} catch (ParseException e) {
			e.printStackTrace();
		}
		return newdate;
	}
	
}
